package com.cdh.edu.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cdh.edu.entity.Course;
import com.cdh.edu.entity.vo.CoursePublishVo;
import com.cdh.edu.entity.vo.CourseVo;
import com.cdh.edu.entity.vo.WebCourseVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author cdh
 * @since 2020-10-20
 */
@Mapper
public interface CourseMapper extends BaseMapper<Course> {

    CoursePublishVo getPublishCourseInfo(String courseId);

    List<CourseVo> selectPageByCourseVo(
            Page<CourseVo> courseVoPage,
            @Param(Constants.WRAPPER) QueryWrapper<CourseVo> queryWrapper);

    WebCourseVo selectWebCourseVoById(String courseId);
}
